import 'package:flutter/material.dart';
import 'package:fwanandroid/ui/blog/BlogTabPage.dart';
import 'package:fwanandroid/ui/home/HomeTabPage.dart';
import 'package:fwanandroid/ui/my/MyPage.dart';
import 'package:fwanandroid/ui/project/ProjectTabPage.dart';
import 'package:fwanandroid/ui/search/SearchPage.dart';

class ContentPageView extends StatefulWidget {

  final PageController pageController;
  final Function(int) onPageChanged;

  const ContentPageView({super.key, required this.pageController, required this.onPageChanged});

  @override
  State<ContentPageView> createState() => _ContentPageViewState();
}

class _ContentPageViewState extends State<ContentPageView> {
  @override
  Widget build(BuildContext context) {
    return Expanded(
        child: PageView(
          controller: widget.pageController,
          onPageChanged: widget.onPageChanged,
          children: const[
            Center(child: HomeTabPage(),),
            Center(child: BlogTabPage(),),
            Center(child: SearchPage(),),
            Center(child: ProjectTabPage(),),
            Center(child: MyPage(),),
          ],
        ));
  }
}
